import axios from '@/utils/request'


export const dictDetail = (id) => {
  return axios({
    method: 'GET',
    url: 'dict/dictDetail/'+id,

  })
}

export function exportReceiveTpl () {
  return axios({
    url: 'dict/exportReceiveTpl',
    method: 'GET',
    responseType: 'blob'
  })
}

export function exportProjectInfoTpl () {
  return axios({
    url: 'dict/exportProjectInfoTpl',
    method: 'GET',
    responseType: 'blob'
  })
}

export const pageDict = (params) => {
  return axios({
    method: 'GET',
    url: 'dict/pageDict',
    params
  })
}

export const listDict = (type) => {
  return axios({
    method: 'GET',
    url: 'dict/listDict/'+type,
  })
}

export const listAllDict = (params) => {
  return axios({
    method: 'GET',
    url: 'dict/listAllDict',
    params
  })
}

export const insertDict = (data) => {
  return axios({
    method: 'POST',
    url: 'dict/insertDict',
    data
  })
}


export const updateDict = (data) => {
  return axios({
    method: 'POST',
    url: 'dict/updateDict',
    data
  })
}

export const deleteDict = (id) => {
  return axios({
    method: 'POST',
    url: 'dict/deleteDict/'+id,
  })
}
